var $table;  
var selectionIds = [];  //保存选中ids  
var tbUserField = dataObject.tbUserField;
var singleStatus;
var toolbar = "toolbar_dialog";
var isSelected = true;
isCopy = true;   //是否显示复制操作
$(function () {
	  var columns =[
                       {field: 'state', checkbox: true},
                       {field: 'name' , title: tbUserField.name, sortName:'name' , sortable: true,halign: 'center',align: 'center'},
                       {field: 'userNo' , title: tbUserField.userNo, sortName:'user_no' , sortable: true,halign: 'center',align: 'center'},
                       {field: '${column.assname}' , title: tbUserField.userType, sortName:'user_type' , sortable: true,halign: 'center',align: 'center'},
                       {field: 'action', title: pageData.action, formatter: '$table.actionFormatter', events: 'actionEvents', clickToSelect: false, width: 150, halign: 'center', align: 'center'}
                   ];
    $table = new BSTable("table", 'tb/tbuser/list', columns,"toolbar",560,'userId','user_id','tbuser');
    var queryParams = function(params) {            
         return {
         	       page: params.pageNumber,
         	       limit: params.pageSize,
         	       sidx: params.sortName,
                   order: params.sortOrder,
                   name:vm.search.name,
                   userNo:vm.search.userNo,
                   userType:vm.search.userType,
                   status:vm.search.status,
              //查询字段
             };
     }
	$table.setQueryParams(queryParams);
    $table.init();
});

var actionUrl = {
	save:    $path+"/tb/tbuser/save",
	update:  $path+"/tb/tbuser/update",
	delete:  $path+"/tb/tbuser/delete",
	audit:   $path+"/tb/tbuser/audit",
	copy:    $path+"/tb/tbuser/copy"
};

var vm = new Vue({
	el:'#app',
	data:{
		showList: true,
		title: null,
        module:"tbuser",
        moduleId:"$pk.columnNam",
		tbUser: {
				
		},
		search:{
            name:"",
		}
	},
	methods: {
	}
});

/*表单校验 start*/
$('#defaultForm').bootstrapValidator({
    feedbackIcons: vail.feedbackIcons(),
    fields: {
               name: vail.REPEAT(" ",tbUserField.name,"25",$path+"/tb/tbuser/checkExist","tbUser","userId","name","name"),
               userNo: vail.REPEAT(" ",tbUserField.userNo,"25",$path+"/tb/tbuser/checkExist","tbUser","userId","userNo","user_no"),
		    
    }
});
/*表单校验 end*/
